/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.ipccenter.toster.jpa;

import java.io.Serializable;
import java.math.BigInteger;
import java.util.Collection;
import javax.persistence.*;

/**
 *
 * @author 7
 */
@Entity
@Table(name = "SUITE")

public class JPASuite implements Serializable {
    private static final long serialVersionUID = 1L;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Id
  
    @Column(name = "SUITE_ID")
    private BigInteger suiteId;
    @Column(name = "TS_ID")
    private BigInteger tsId;
  
    @Column(name = "SUITE_DESC")
    private String suiteDesc;
    @OneToMany(mappedBy = "suiteId")
    private Collection<JPASession> sessions;

    public JPASuite() {
    }

    public JPASuite(BigInteger suiteId) {
        this.suiteId = suiteId;
    }

    public BigInteger getSuiteId() {
        return suiteId;
    }

    public void setSuiteId(BigInteger suiteId) {
        this.suiteId = suiteId;
    }

    public BigInteger getTsId() {
        return tsId;
    }

    public void setTsId(BigInteger tsId) {
        this.tsId = tsId;
    }

    public String getSuiteDesc() {
        return suiteDesc;
    }

    public void setSuiteDesc(String suiteDesc) {
        this.suiteDesc = suiteDesc;
    }

    public Collection<JPASession> getSessionsCollection() {
        return sessions;
    }

    public void setSessionsCollection(Collection<JPASession> sessions) {
        this.sessions = sessions;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (suiteId != null ? suiteId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof JPASuite)) {
            return false;
        }
        JPASuite other = (JPASuite) object;
        if ((this.suiteId == null && other.suiteId != null) || (this.suiteId != null && !this.suiteId.equals(other.suiteId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "edu.ipccenter.toster.jpa.Suite[ suiteId=" + suiteId + " ]";
    }
    
}
